package com.qidian.buy.item.mq;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Configuration;

/**
 * @author 戴着假发的程序员
 * @company 起点编程
 * @date 2023/9/15 10:18
 */
@Configuration
public class FanoutExchangeReceive {

    @RabbitListener(queues = {"item-queue"})
    public void item(String msg){
        System.out.println("item端收到消息： " + msg);
    }
    @RabbitListener(queues = {"search-queue"})
    public void search(String msg){
        System.out.println("search端收到消息： " + msg);
    }
}